package com.shop.controller;

import com.shop.common.result.util.ResultModel;
import com.shop.service.UploadService;
import com.shop.vo.UploadImageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "上传前端控制器")
@RequestMapping("/upload")
public class UploadController {

    @Autowired
    private UploadService uploadService;

    @PostMapping("image")
    @ApiOperation(value = "上传图片到ftp",notes = "靳旺")
    public ResultModel uploadImage(UploadImageVo uploadImageVo) throws Exception {
        return uploadService.uploadImage(uploadImageVo);
    }


}
